package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	FlowEventNew           = "flow.FlowNew"
	FlowEventBeforeCreate  = "flow.FlowBeforeCreate"
	FlowEventBeforeUpdate  = "flow.FlowBeforeUpdate"
	FlowEventBeforeSave    = "flow.FlowBeforeCreate flow.FlowBeforeUpdate"
	FlowEventAfterCreate   = "flow.FlowAfterCreate"
	FlowEventAfterUpdate   = "flow.FlowAfterUpdate"
	FlowEventAfterSave     = "flow.FlowAfterCreate flow.FlowAfterUpdate"
	FlowEventDelete        = "flow.FlowDelete"
	FlowAccessControlEvent = "flow.FlowAccessControl"
)

func GetFlowConfig() *mgo.DocConfig {
	return Flow_Config
}

var Flow_Config *mgo.DocConfig

func init() {
	Flow_Config = NewFlowConfig()
}
func NewFlowConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "flow.Flow",
		Fields: []string{
			"name", "points",
		},
		RelationFields:  []string{},
		RelationConfigs: map[string]*mgo.DocRelation{},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
